﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using PM.Services;
using PM.Common;
using PM.Entity;


namespace PM.Site
{
    public partial class BrokerForm : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            this.Loading();
        }

        private void Loading()
        {

        }

        protected void btnSave_Click(object sender, EventArgs e)
        {
            Broker broker = new Broker();
            broker.BrokerId = txbBrokerId.Text;
            broker.Name = txbName.Text;
            broker.Address_1 = txbAddress1.Text;
            broker.Address_2 = txbAddress2.Text;
            broker.Address_3 = txbAddress3.Text;
            broker.Address_4 = txbAddress4.Text;
            broker.Hotline = txbHotine.Text;
            broker.Telephone_1 = txbTelephone1.Text;
            broker.Telephone_2 = txbTelephone2.Text;
            broker.Fax = txbFax.Text;
            broker.CreatedDate = DateTime.Now.Date;

            BrokerServices.Add(broker);
        }
    }
}
